 <?php ob_start();
require('includes/connect.php');
    	$vendor_id = $_POST["vendor_id"];
    	$fname = $_POST["fname"];
		$lname = $_POST["lname"];
		$address = $_POST["address"];
		$phone = $_POST["phone"];
		$mob = $_POST["mob"];
		$username = $_POST["username"];	
		$subcategory = $_POST["subcategory"];



$sql="Update vendors set `vendors_fname`='$fname',`vendors_lname`='$lname',`vendors_address`='$address',`vendors_phone`='$phone',`vendors_mob`='$mob',`vendors_username`='$username',`subcategory_id`='$subcategory' where vendors_id=".$vendor_id;
$result=mysql_query($sql);
		
		if($result)
						{
	
					header("location:viewvendors.php");
		}
	else {
		//header("location:edit_user.php");
		echo mysql_error();
	}
	
ob_flush();	?>




